package com.dzm.demo.myshop.domain;

import com.dzm.demo.myshop.commons.persistence.BaseEntity;
import com.dzm.demo.myshop.commons.persistence.BaseTreeEntity;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.sun.org.apache.xpath.internal.operations.Bool;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

/**
 * 分类管理
 *@author:LeoDang
 *@date:2019/4/5
 *@version 1.0.0
 */

@Data
public class TbContentCategory extends BaseTreeEntity {

    @Length(min = 1, max = 20, message = "分类名称必须介于 1 - 20 位之间")
    private String name;

    private Integer status;

    @NotNull(message = "排序不能为空")
    private Integer sortOrder;

    @JsonProperty(value = "isParent")
    private Boolean isParent;

    private TbContentCategory parent;

}
